<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动</title>
    <style>
        #div1{
            /* width: 40px; */
            background-color: red;
        }
        /* #div2{ 
            background-color: blue;
                float:right；
        }            */
        
    </style>
</head>
<body>
    <div id="div1">
        <!-- <div id="div2"></div> -->
    </div>
    
</body>
</html>